﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LearningEnglish.ViewModels;

namespace LearningEnglish.Controllers.Mock
{
    public class MockLearnUserController : Controller
    {

        [AcceptExAjax]
        [NormalJson]
        public ActionResult Login(string name, string password)
        {
            if (name == "admin" && password == "fff")
                return Json(new { token = ZData.Ticket }, JsonRequestBehavior.AllowGet);

            throw new Exception("测试账号，密码错误");
        }

        [AcceptExAjax]
        public ActionResult Register()
        {
            return Json(new { id = ZData.LearnID }, JsonRequestBehavior.AllowGet);
        }


       
    }
}